home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: delta / whiteline CD Series - delta.iso / tex / style / misc / tugbot.sty (.txt) < prev    next >
Texinfo Document  |  1995-11-25  |  66KB  |  1,593 lines

  1. % TUGBOT.STY
  2. % Version 0.5; 1.0 expected Nov. 1 1989
  3. % general items
  4. \def\makeatletter{\catcode`\@=11 }
  5. \makeatletter           % used, as in PLAIN, in protected control sequences
  6. \ifx\tugstyloaded@\relax\makeatother\initializearticle
  7.  \endinput\else\let\tugstyloaded@\relax\fi
  8. \input tugbot.com
  9. %      Stuff different from PLAIN, or reiterated for clarity
  10. \newlinechar=`\^^J
  11. %\def~{\penalty\@M \ } % tie -- this is PLAIN value; it is reset in AMS-TeX
  12. \def~{\unskip\nobreak\ \ignorespaces} % AMS-TeX value
  13. \normallineskiplimit=1pt
  14. \def\,{\ifmmode\mskip\thinmuskip\else$\,$\nobreak\fi}
  15. \def \NoParIndent{\parindent=0pt}
  16. \newdimen\normalparindent        \normalparindent=20pt          % plain = 20pt
  17. \def \NormalParIndent{\global\parindent=\normalparindent}
  18. \NormalParIndent
  19. \def\vellipsis{%
  20.   \leavevmode\kern0.5em
  21.   \raise1pt\vbox{\baselineskip6pt\vskip7pt\hbox{.}\hbox{.}\hbox{.}}
  22. %       some things with the same names as in, or reiterated from, AMS-TeX
  23. \def \document{}                % override an AMS-TeX convention
  24. \output{\output@}
  25. %       for compatibility with LaTeX
  26. \def\clearpage{\newpage}
  27. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  28. %                                                                             %
  29. %                       ***** fonts and friends *****                         %
  30. %                                                                             %
  31. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  32. %       Struts give ascenders and descenders to assist in baseline alignment
  33. %       (e.g. of adjoining vertical boxes); useful only with text fonts.
  34. %       \strut is defined in PLAIN .  The structure of \strutt is equivalent.
  35. \newbox\struttbox
  36. \def\strutt{\relax\ifmmode\copy\struttbox\else\unhcopy\struttbox\fi}
  37. %       Struts are given the following dimensions for use in TUGboat:
  38. %               \strut = height/depth of parenthesis in current font
  39. %                        (not the same as PLAIN)
  40. %               \strutt height + depth = \normalbaselineskip,
  41. %                        height = same as \strut
  42. %                        (equivalent to PLAIN \strut )
  43. %       The fonts below are sufficient for most ordinary TUGboat production.
  44. %       Additional titling fonts are defined elsewhere, and occasionally an
  45. %       extra font will be needed for a particular item (e.g. the device
  46. %       charts) and defined in that file.
  47. %       All PLAIN CM fonts.
  48. \font\tenrm=cmr10
  49. \font\ninerm=cmr9
  50. \font\eightrm=cmr8
  51. \font\sevenrm=cmr7
  52. \font\sixrm=cmr6
  53. \font\fiverm=cmr5
  54. \font\teni=cmmi10 \skewchar\teni='177
  55. \font\ninei=cmmi9 \skewchar\ninei='177
  56. \font\eighti=cmmi8 \skewchar\eighti='177
  57. \font\seveni=cmmi7 \skewchar\seveni='177
  58. \font\sixi=cmmi6 \skewchar\sixi='177
  59. \font\fivei=cmmi5 \skewchar\fivei='177
  60. \font\tensy=cmsy10 \skewchar\tensy='60
  61. \font\ninesy=cmsy9 \skewchar\ninesy='60
  62. \font\eightsy=cmsy8 \skewchar\eightsy='60
  63. \font\sevensy=cmsy7 \skewchar\sevensy='60
  64. \font\sixsy=cmsy6 \skewchar\sixsy='60
  65. \font\fivesy=cmsy5 \skewchar\fivesy='60
  66. \font\tenex=cmex10
  67. \font\tenbf=cmbx10
  68. \font\ninebf=cmbx9
  69. \font\eightbf=cmbx8
  70. \font\sevenbf=cmbx7
  71. \font\sixbf=cmbx6
  72. \font\fivebf=cmbx5
  73. \font\tentt=cmtt10
  74. \font\ninett=cmtt9
  75. \font\eighttt=cmtt8
  76. \font\tensl=cmsl10
  77. \font\ninesl=cmsl9
  78. \font\eightsl=cmsl8
  79. \font\sevensl=cmsl8 scaled 900
  80. \font\tenit=cmti10
  81. \font\nineit=cmti9
  82. \font\eightit=cmti8
  83. \font\sevenit=cmti7
  84. \font\tenupit=cmu10
  85. \font\tensmc=cmcsc10
  86. \font\tentex=cmtex10
  87. \def \mit{\fam\@ne}
  88. \def \cal{\fam\tw@}
  89. \def \sy{\cal}          % old name
  90. %       fonts added for TUGboat
  91. %       TUGboat section heads
  92. \font \seventeenssb=cmssbx10 scaled \magstep3
  93. \font \twelvessb=cmssbx10 scaled \magstep1
  94. \font \tenssb=cmssbx10
  95. %       For cmss fonts not needed all the time, permit as-needed access
  96. \def\LoadSansFonts{%
  97.         \global\font\twelvess=cmss10 scaled \magstep1
  98.         \global\font\tenss=cmss10
  99.         \global\font\niness=cmss9
  100.         \global\font\eightss=cmss8
  101.         \AddToTenPoint{\def\ssf{\tenss}}
  102.         \AddToNinePoint{\def\ssf{\niness}}
  103.         \AddToEightPoint{\def\ssf{\eightss}}
  104.         \gdef\LoadSansFonts{}}
  105. \newfam\titlefam
  106. \newdimen\titlefontbaselineskip         \titlefontbaselineskip=18pt
  107. \def \titlefont{\textfont\titlefam=\seventeenssb
  108.         \scriptfont\titlefam=\twelvessb \scriptscriptfont\titlefam=\tenssb
  109.         \fam\titlefam \seventeenssb \baselineskip=\titlefontbaselineskip }
  110. %       Definitions of \tenpoint, \ninepoint, etc.
  111. %       Planned additions and changes:
  112. %       Dynamic loading of fonts, probably in groups according to size
  113. %       Removal of \rm, \bf, etc., from \*point expansions, replacement
  114. %               by generic \rm, \bf, etc. definitions
  115. %       Mechanism for switching neatly between serif and sans-serif
  116. %       Following will allow text to be a bit stretchier than the built-in
  117. %       setting; TeXbook, page 433, 355
  118. \newdimen\normaltenptstretch    \normaltenptstretch=1.6667pt
  119. \newdimen\extratenptstretch     \extratenptstretch=4pt
  120. \def\NormalTenPointSpacing{\fontdimen3\tenrm=\normaltenptstretch
  121.                 \fontdimen3\tenit=\normaltenptstretch}
  122. \def\StretchyTenPointSpacing{\fontdimen3\tenrm=\extratenptstretch
  123.                 \fontdimen3\tenit=\extratenptstretch}
  124. \newskip\ttglue
  125. \def\setttglue{\tt \global\ttglue=.5em plus .25em minus .15em}
  126. \def \tenpoint{\normalbaselineskip=12pt         % \def\pointsize@AmS{t}
  127.         \abovedisplayskip=3pt plus 3pt minus 1pt
  128.         \belowdisplayskip=3pt plus 3pt minus 1pt
  129.         \abovedisplayshortskip=0pt plus 3pt
  130.         \belowdisplayshortskip=1pt plus 3pt minus 1pt
  131.         \def\rm{\fam\z@\tenrm}%
  132.         \textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
  133.         \def\oldstyle{\fam\@ne\teni}%
  134.         \textfont1=\teni \scriptfont1=\seveni \scriptscriptfont1=\fivei
  135.         \textfont2=\tensy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy
  136.         \textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex
  137.         \def\it{\fam\itfam\tenit}%
  138.         \textfont\itfam=\tenit \scriptfont\itfam=\sevenit
  139.         \def\sl{\fam\slfam\tensl}%
  140.         \textfont\slfam=\tensl \scriptfont\slfam=\sevensl
  141.         \def\bf{\fam\bffam\tenbf}%
  142.         \textfont\bffam=\tenbf \scriptfont\bffam=\eightbf
  143.                 \scriptscriptfont\bffam=\sixbf
  144.         \def\smc{\tensmc}%
  145.         \def\tt{\tentt}%
  146.         \setttglue
  147.         \def\upright{\tenupit}%
  148.         \setbox\strutbox=\hbox{\vrule height7.5pt depth2.5pt width\z@}%
  149.         \setbox\struttbox=\hbox{\vrule height8.5pt depth3.5pt width\z@}%
  150.         \normalbaselines \the\@AdditionsToTenPoint \rm }
  151. %       permit external additions to pointsize definition
  152. \newtoks\@AdditionsToTenPoint
  153. \def \AddToTenPoint#1{%
  154.   \@AdditionsToTenPoint=\expandafter{\the\@AdditionsToTenPoint#1}}
  155. \tenpoint                       % initialize -- default font
  156. \newdimen\normalnineptstretch   \normalnineptstretch=1.5pt
  157. \newdimen\extranineptstretch    \extranineptstretch=3.6pt
  158. \def\NormalNinePointSpacing{\fontdimen3\ninerm=\normalnineptstretch}
  159. \def\StretchyNinePointSpacing{\fontdimen3\ninerm=\extranineptstretch}
  160. \def \ninepoint{\normalbaselineskip=11pt
  161.         \abovedisplayskip=2.5pt plus 2.5pt minus 1pt
  162.         \belowdisplayskip=2.5pt plus 2.5pt minus 1pt
  163.         \abovedisplayshortskip=0pt plus 2.5pt
  164.         \belowdisplayshortskip=1pt plus 2.5pt minus 1pt
  165.         \def\rm{\fam\z@\ninerm}%
  166.         \textfont0=\ninerm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
  167.         \def\oldstyle{\fam\@ne\ninei}%
  168.         \textfont1=\ninei \scriptfont1=\seveni \scriptscriptfont1=\fivei
  169.         \textfont2=\ninesy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy
  170.         \def\it{\fam\itfam\nineit}%
  171.         \textfont\itfam=\nineit
  172.         \def\sl{\fam\slfam\ninesl}%
  173.         \textfont\slfam=\ninesl
  174.         \def\bf{\fam\bffam\ninebf}%
  175.         \textfont\bffam=\ninebf \scriptfont\bffam=\sevenbf
  176.                 \scriptscriptfont\bffam=\sixbf
  177.         \def\smc{\ninesmc}%
  178.         \def\tt{\ninett}%
  179.         \setttglue
  180.         \setbox\strutbox=\hbox{\vrule height 6.75pt depth 2.25pt width\z@}%
  181.         \setbox\struttbox=\hbox{\vrule height 7.75pt depth 3.25pt width\z@}%
  182.         \normalbaselines \the\@AdditionsToNinePoint \rm }
  183. %               this is equivalent to baselineskip = 10pt
  184. %       \setbox\struttbox=\hbox{\vrule height 7.25pt depth 2.75pt width\z@}%
  185. \newtoks\@AdditionsToNinePoint
  186. \def \AddToNinePoint#1{%    permit external additions to font
  187.   \@AdditionsToNinePoint=\expandafter{\the\@AdditionsToNinePoint#1}}
  188. \newdimen\normaleightptstretch  \normaleightptstretch=1.333pt
  189. \newdimen\extraeightptstretch   \extraeightptstretch=3pt
  190. \def\NormalEightPointSpacing{\fontdimen3\eightrm=\normaleightptstretch}
  191. \def\StretchyEightPointSpacing{\fontdimen3\eightrm=\extraeightptstretch}
  192. \def \eightpoint{\normalbaselineskip=10pt
  193.         \abovedisplayskip=2pt plus 2pt minus 1pt
  194.         \belowdisplayskip=2pt plus 2pt minus 1pt
  195.         \abovedisplayshortskip=0pt plus 2pt
  196.         \belowdisplayshortskip=1pt plus 2pt minus 1pt
  197.         \def\rm{\fam\z@\eightrm}%
  198.         \textfont0=\eightrm \scriptfont0=\sixrm \scriptscriptfont0=\fiverm
  199.         \def\oldstyle{\fam\@ne\eighti}%
  200.         \textfont1=\eighti \scriptfont1=\sixi \scriptscriptfont1=\fivei
  201.         \textfont2=\eightsy \scriptfont2=\sixsy \scriptscriptfont2=\fivesy
  202. %       \textfont3=\eightex \scriptfont3=\eightex \scriptscriptfont3=\eightex
  203.         \def\it{\fam\itfam\eightit}%
  204.         \textfont\itfam=\eightit
  205.         \def\sl{\fam\slfam\eightsl}%
  206.         \textfont\slfam=\eightsl
  207.         \def\bf{\fam\bffam\eightbf}%
  208.         \textfont\bffam=\eightbf \scriptfont\bffam=\sixbf
  209.                 \scriptscriptfont\bffam=\sixbf
  210.         \def\smc{\eightsmc}%
  211.         \def\tt{\eighttt}%
  212.         \setttglue
  213.         \setbox\strutbox=\hbox{\vrule height 6pt depth 2pt width\z@}%
  214.         \setbox\struttbox=\hbox{\vrule height 7pt depth 3pt width\z@}%
  215.         \normalbaselines \the\@AdditionsToEightPoint \rm }
  216. %               this is equivalent to baselineskip = 9pt
  217. %       \setbox\struttbox=\hbox{\vrule height 6.5pt depth 2.5pt width\z@}%
  218. \newtoks\@AdditionsToEightPoint
  219. \def \AddToEightPoint#1{%    permit external additions to font
  220.   \@AdditionsToEightPoint=\expandafter{\the\@AdditionsToEightPoint#1}}
  221. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  222. %                                                                             %
  223. %                       *****  page dimensions  *****                         %
  224. %                                                                             %
  225. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  226. \newdimen\trimlgt       \trimlgt=11in           % 10.5in (vols 7-9)
  227. \newdimen\headmargin    \headmargin=3.5pc       % 2.5pc  (vols 7-9)
  228. \newdimen\pagelgt
  229. \newdimen\rheadlgt      \rheadlgt=2.5pc         % + headmargin = 6pc = 1in
  230. \newdimen\toplgt        \toplgt=0pt
  231. \newdimen\normalcollgt  \normalcollgt=54pc      % 52pc for 5#2
  232. \newdimen\collgt        \collgt=\normalcollgt
  233. \newdimen\Collgt
  234. \maxdepth=2pt
  235. \newdimen\botlgt        \botlgt=0pt
  236. \newdimen\rfootlgt      \rfootlgt=2pc
  237. \newif\ifThisIsFirstPage        \ThisIsFirstPagefalse
  238. \def \resetpagelgt{\pagelgt=\collgt \Collgt=\collgt
  239.         \advance\pagelgt by \rheadlgt
  240.         \ifThisIsFirstPage \advance\Collgt by-\toplgt
  241.                         \advance\Collgt by-\botlgt \fi
  242.         \advance\pagelgt by \maxdepth
  243.         \global\advance\pagelgt by \rfootlgt
  244.         \global\vsize=\Collgt }
  245. \def \resetfpagelgt{\global\ThisIsFirstPagetrue
  246.         \resetpagelgt }                 % exclude special first page material
  247. \resetpagelgt
  248. \raggedbottom
  249. \newdimen\colwd
  250. \newdimen\pagewd        \pagewd=39pc
  251. \newdimen\trimwd        \trimwd=\pagewd
  252. \def \onecol{\colwd=\pagewd             \OneCol }
  253. \newdimen\onenarrowcolwd        \onenarrowcolwd=30pc
  254. \def \onenarrow{\colwd=\onenarrowcolwd  \OneCol }
  255. %       before 5#2, `narrow' was 34pc
  256. \newdimen\onemediumcolwd        \onemediumcolwd=34pc
  257. \def \onemedium{\colwd=\onemediumcolwd  \OneCol }
  258. \newdimen\twocolcolwd           \twocolcolwd=18.75pc
  259. \def \twocol{\colwd=\twocolcolwd        \TwoCol }
  260. \newdimen\threecolcolwd         \threecolcolwd=12pc
  261. \def \threecol{\colwd=\threecolcolwd    \ThreeCol }
  262. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  263. %                                                                             %
  264. %                       *****      headers/footers      *****                 %
  265. %                                                                             %
  266. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  267. \def \pagenoprefix{}
  268. \def \rtitlex{\def\tubfont{\rm}\TUB, \volx }
  269. \def \rtitle{\hbox to \pagewd{\tenrm
  270.         \makestrut[10pt;\z@]%
  271.         \ifodd\pageno \rtitlex\qquad\midrtitle\hfil\pagenoprefix\number\pageno
  272.         \else \pagenoprefix\number\pageno\hfil\midrtitle\qquad\rtitlex \fi }}
  273. \def \runhead{\vbox to \rheadlgt{\rtitle \vfil }}
  274. \def \runfoot{%
  275.   \vbox to \rfootlgt{
  276.     \ifnum\xcol=2
  277.       \hbox to \pagewd{\makestrut[1.5pc;\z@]\midrtitle\hfil\midrtitle}\fi
  278.     \vfil }}
  279. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  280. %                                                                             %
  281. %                       *****       output      *****                         %
  282. %                                                                             %
  283. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  284. %       In the absence of automatic column-balancing, provide a mechanism
  285. %       for manually shortening a specified page.
  286. \newif\ifSh@rtPage              \Sh@rtPagefalse
  287. \newif\ifSh@rtPagePending       \Sh@rtPagePendingfalse
  288. \newcount\Sh@rtPageNo
  289. \newdimen\Sh@rtPageLgt
  290. \def\@to{to}                    \def\@by{by}
  291. %       #1 = to/by; #2 = \dimen; #3 = <dimen>; #4 = * of Shorten*Page
  292. \def\@toby#1#2#3#4{\def\@tb{#1}%
  293.         \ifx \@tb\@to \global #2=#3
  294.         \else \ifx \@tb\@by \T@stDimen=#3         % accommodate negative #3
  295.                         #2=\normalcollgt \global\advance #2 by -\T@stDimen
  296.                 \else \errmessage{#1 is invalid syntax; \string\Shorten#4Page
  297.                                 requires "to" or "by"}\fi
  298.         \fi }
  299. \def\@plusno#1#2;{\if +#1\T@stCount=\pageno \advance\T@stCount by #2
  300.                         \else \T@stCount=#1#2 \fi }
  301. \def \ShortenPage #1 #2 #3. {\global\Sh@rtPagePendingtrue
  302. %               \global\Sh@rtPageNo=#1
  303.                 \@plusno#1;\global\Sh@rtPageNo=\T@stCount
  304.                 \@toby{#2}{\Sh@rtPageLgt}{#3}{}}
  305. \def \ShortenThisPage #1 #2. {\global\Sh@rtPagetrue
  306.                 \@toby{#1}{\vsize}{#2}{This}}
  307. %       Two cases: 0 = last page was nonstandard; reset \vsize
  308. %                  1 = do not reset \vsize: okay or length already reset
  309. \def \D@EndPage{\global\advancepageno
  310.         \T@stCount=1
  311.         \ifThisIsFirstPage \T@stCount=0 \global\ThisIsFirstPagefalse
  312.                         \resetfirsthead \resetfirstfoot
  313.                         \global\collgt=\normalcollgt \fi
  314.         \ifSh@rtPage \T@stCount=0 \global\Sh@rtPagefalse \fi
  315.         \ifSh@rtPagePending
  316.                 \ifnum\pageno = \Sh@rtPageNo \T@stCount=1
  317.                         \global\vsize=\Sh@rtPageLgt
  318.                         \global\Sh@rtPagePendingfalse
  319.                         \global\Sh@rtPagetrue \fi
  320.         \fi
  321.         \ifcase \T@stCount \resetpagelgt \fi }
  322. % Add more powerful means of adjusting pages by keeping a list of
  323. % commands to be executed prior to making up the next page.  This
  324. % technique will be expanded in the next version of the output
  325. % routine.
  326. % "\DelayedCommand <page number> <column number> <command>\endCommand"
  327. % places the token list <command> at the end of a list of "things to do".
  328. % At the end of every column, the output routine checks this list to
  329. % see whether the head of the list should be "executed" prior to
  330. % building the next column.  If so, the execution is performed.
  331. % Right now, items must be placed in the execution list in order,
  332. % and all items for a given column must be combined into a single
  333. % token list.
  334. % Natural applications are double column figures and column size
  335. % adjustments.  E.g.
  336. % \DelayedCommand +5 1 \global\advance\vsize by 2\baselineskip\endCommand
  337. % will increase the \vsize of the first column of the page 5 pages from
  338. % "now" by 2 baselines.  To pull the \vsize back to normal would require
  339. % another use of \DelayedCommand.  Double column figures can be achieved
  340. % with insertions called by \DelayedCommand.
  341. % Right now the technique is messy, but it can be used by those who know
  342. % how it's implemented and know its limitations.
  343. \newtoks\@DelayedCommandList
  344. \def\DelayedCommand #1 #2 #3\endCommand{%
  345.   \@plusno#1;%
  346.   \edef\@temp{\the\@DelayedCommandList<\number\T@stCount>}%
  347.   \global\@DelayedCommandList=\expandafter{\@temp<#2>#3\endCommand}%
  348. \def\@FindNextDCPoint <#1><#2>#3\endList{%
  349.   \def\DCpage{#1}\def\DCcolumn{#2}}
  350. \def\FindNextDCPoint{%
  351.   \edef\@temp{\the\@DelayedCommandList}%
  352.   \ifx\@temp\empty \def\DCpage{10000}\def\DCcolumn{0}%
  353.   \else
  354.     \edef\@form{%
  355.       \noexpand\@FindNextDCPoint\the\@DelayedCommandList\noexpand\endList}%
  356.     \@form
  357.   \fi}
  358. \def\@ExecuteNextDC <#1><#2>#3\endCommand#4\endList{%
  359.   \global\@DelayedCommandList={#4}%
  360.   #3}
  361. \def\ExecuteNextDC{%
  362.   \FindNextDCPoint
  363.   \ifnum \pageno=\DCpage \ifnum\xcol=\DCcolumn
  364.     \edef\@form{%
  365.       \noexpand\@ExecuteNextDC\the\@DelayedCommandList\noexpand\endList}%
  366.     \@form
  367.   \fi \fi}
  368. %       Distinguish between laser printer output (for proofing and other
  369. %       general use) and production, which uses a phototypesetter.
  370. \newif\ifLaser                  \Lasertrue
  371. %       Registration marks
  372. \def \HorzR@gisterRule{\vrule height 0.2pt depth 0pt width 0.5in }
  373. \def \DownShortR@gisterRule{\vrule height 0.2pt depth 1pc width 0.2pt }
  374. \def \UpShortR@gisterRule{\vrule height 1pc depth 0pt width 0.2pt }
  375. %               ``T'' marks centered on top and bottom edges of paper
  376. \def \ttopregister{\dlap{%
  377.         \hbox to \trimwd{\HorzR@gisterRule \hfil \HorzR@gisterRule
  378.                         \HorzR@gisterRule \hfil \HorzR@gisterRule}%
  379.         \hbox to \trimwd{\hfil \DownShortR@gisterRule \hfil}}}
  380. \def \tbotregister{\ulap{%
  381.         \hbox to \trimwd{\hfil \UpShortR@gisterRule \hfil}%
  382.         \hbox to \trimwd{\HorzR@gisterRule \hfil \HorzR@gisterRule
  383.                         \HorzR@gisterRule \hfil \HorzR@gisterRule}}}
  384. \def \topregister{\ttopregister}
  385. \def \botregister{\tbotregister}
  386. %       All pages containing data are formatted by \midpage
  387. \def \midpage#1{\vbox{\basezero
  388.         \ifLaser \hrule height\z@ depth\z@ width\p@
  389.                 \vskip-\rheadlgt
  390.         \else \vbox to \trimlgt \bgroup
  391.                 \topregister
  392.                 \vskip \headmargin
  393.         \fi
  394.         \vbox to \pagelgt{\basezero
  395.                 \ifnum\xcol=2 \runhead
  396.                 \else \vbox to \rheadlgt{}\fi
  397.                 \ifThisIsFirstPage \firsthead \fi
  398.                 \hbox to \pagewd{#1}%   % \vsize applied in \pagebody
  399.                 \ifThisIsFirstPage \firstfoot \fi
  400.                 \vfil           % if no depth, avoid underfull box
  401.                 \runfoot }%
  402.         \ifLaser \else \vfill \botregister \egroup \fi}%
  403.         \ifnum\xcol=2 \global\xcol=1 \D@EndPage
  404.         \else \global\xcol=2 \fi
  405.         \global\advance\spoolno by 1 }
  406. %       The production version includes trim marks, which are required
  407. %       on photographic paper, but are unsuitable for laser printer output.
  408. %       The production version also generates 2 separate .dvi pages for each
  409. %       logical page; these are overlaid photographically, and allow the
  410. %       Alphatype to run more efficiently on 2-column pages.
  411. %       For laser printer output, each page is output as a unit.
  412. %               set up auxiliary `page numbers'
  413. %               \pageno = \count0  as used in PLAIN
  414. \countdef\xcol=1        \xcol=1
  415. \countdef\spoolno=2     \spoolno=1
  416. \def \newcol{\par\vfill\eject}
  417. \newcount\numcols
  418. \newif\ifOneColFormat
  419. \newbox\SaveP@geBox
  420. \def \OneCol{\hsize=\colwd \numcols=1
  421.         \gdef\newpage{\par\vfill\eject}%
  422.         \OneColFormattrue
  423.         \gdef\output@{%
  424.                 \ifLaser \xcol=2 \shipout\midpage{\hfil\pagebody \hfil}%
  425.                 \else \shipout\midpage{\hfil\pagebody \hfil}%
  426.                         \shipout\vbox to \trimlgt{\basezero
  427.                                 \topregister
  428.                                 \vskip\headmargin
  429.                                 \vbox to \pagelgt{\basezero
  430.                                         \runhead
  431.                                         \vfill }%
  432.                                 \vfill
  433.                                 \botregister }%
  434.                         \D@EndPage
  435.                         \global\xcol=1
  436.                         \global\advance\spoolno by 1
  437.                 \fi
  438.                 \ExecuteNextDC }}
  439. \def \TwoCol{\hsize=\colwd \numcols=2
  440.         \gdef\newpage{\par\vfill\eject
  441.                         \ifnum\xcol=2 \null\vfill\eject \fi }%
  442.         \OneColFormatfalse
  443.         \gdef\output@{% % use PLAIN's \pagebody instead of \box255
  444.                 \ifnum\xcol=1
  445.                         \ifLaser \global\setbox\SaveP@geBox=\vbox{\pagebody}%
  446.                                 \global\xcol=2
  447.                         \else \shipout\midpage{\pagebody \hfil}\fi
  448.                 \else \shipout\midpage{\ifLaser \box\SaveP@geBox \fi
  449.                                 \hfil\pagebody }\fi
  450.                 \ExecuteNextDC
  451.                 \ifnum\outputpenalty>-\@MM \else \dosupereject \fi }}
  452. %       Three-column format is a hack.  Collect all column data and
  453. %       ship it out in the third segment, but conform to the \midpage
  454. %       convention that \xcol can never be greater than 2.
  455. \newbox\SaveP@geTwoBox
  456. \def \ThreeCol{\hsize=\colwd \numcols=3
  457.         \gdef\newpage{\par\vfill\eject
  458.                 \loop \ifnum\xcol>1 \advance\xcol by 1
  459.                         \hbox to \hsize{\hfill}\vfill\eject \repeat }%
  460.         \OneColFormatfalse
  461.         \gdef\output@{% % use PLAIN's \pagebody instead of \box255
  462.                 \ifnum\xcol=1
  463.                         \global\setbox\SaveP@geBox=\vbox{\pagebody}%
  464.                                 \global\xcol=2
  465.                 \else \ifnum\xcol=2
  466.                         \global\setbox\SaveP@geTwoBox=\vbox{\pagebody}%
  467.                                 \global\xcol=3
  468.                         \else \ifLaser
  469.                                 \else \xcol=1 \shipout\midpage
  470.                                         {\vbox to \vsize{\null\vfill}}\fi
  471.                                 \xcol=2
  472.                                 \shipout\midpage{\box\SaveP@geBox
  473.                                         \hfil \box\SaveP@geTwoBox
  474.                                         \hfil \pagebody }\fi
  475.                 \fi
  476.                 \ExecuteNextDC
  477.                 \ifnum\outputpenalty>-\@MM \else \dosupereject \fi }}
  478. %       Reorganize \pagecontents from PLAIN to put footnotes at very
  479. %       bottom of page, even if \raggedbottom.
  480. \def\pagecontents{\ifvoid\topins\else\unvbox\topins\fi
  481.   \dimen@=\dp\@cclv \unvbox\@cclv % open up \box255
  482.   \ifr@ggedbottom \kern-\dimen@ \vfil \fi
  483.   \ifvoid\footins\else % footnote info is present
  484.     \vskip\skip\footins
  485.     \footnoterule
  486.     \unvbox\footins\fi
  487.   \ifvoid\botins\else
  488.     \vskip\skip\botins
  489.     \unvbox\botins\fi }
  490. \newif\if@floatable     \@floatabletrue
  491. \def\nofloat{\@floatablefalse}
  492. % redefine \@ins to avoid the \par of PLAIN
  493. \def\@ins{\begingroup\setbox\z@\vbox\bgroup} % start a \vbox
  494. \newinsert\botins
  495. \newif\ifp@ge \newif\if@mid \newif\if@bot
  496. \def\topinsert{\@midfalse\p@gefalse\@botfalse\@ins}
  497. \def\botinsert{\@midfalse\p@gefalse\@bottrue\@ins}
  498. \def\midinsert{\@midtrue\@botfalse\@ins}
  499. \def\pageinsert{\@midfalse\@botfalse\p@getrue\@ins}
  500. \skip\botins=\z@
  501. \count\botins=1000
  502. \dimen\botins=\maxdimen
  503. \def\endinsert{\egroup % finish the \vbox
  504.   \if@mid \dimen@\ht\z@ \advance\dimen@\dp\z@
  505.     \advance\dimen@12\p@ \advance\dimen@\pagetotal
  506.     \if@floatable
  507.       \ifdim\dimen@>\pagegoal\@midfalse\@botfalse\p@gefalse\fi\fi
  508.     \fi
  509.   \if@mid
  510.     \vskip\abovedisplayskip
  511.     \box\z@
  512.     \vskip\belowdisplayskip
  513.     \@asifbelowdisplay
  514.   \else\insert\if@bot\botins\else\topins\fi
  515.    {\penalty100 % floating insertion
  516.     \if@bot\medskip\nobreak\fi
  517.     \splittopskip\z@skip
  518.     \splitmaxdepth\maxdimen \floatingpenalty\z@
  519.     \ifp@ge \dimen@\dp\z@
  520.       \vbox to\vsize{\unvbox\z@\kern-\dimen@}% depth is zero
  521.     \else \box\z@\fi
  522.     \if@bot\else\medskip\fi
  523.    }%
  524.   \fi\endgroup}
  525. % **********************************************************************
  526. %       Section titles and separators
  527. \newskip\Tabskss
  528. \Tabskss=0pt plus 1000pt minus 1000pt
  529. \newskip\AboveTitleSkip  \AboveTitleSkip=12pt   % 10pt plus 2pt minus 2pt
  530. \newskip\BelowTitleSkip  \BelowTitleSkip=8pt    % plus 1pt minus 1pt
  531. \setbox\T@stBox=\hbox{\titlefont O}
  532. \newdimen\stfontheight          \stfontheight=\ht\T@stBox
  533. \newdimen\strulethickness       \strulethickness=.6pt
  534. \newcount\n@stnum               \n@stnum=0
  535. \def \sthrule{\hrule height\strulethickness depth 0pt }
  536. \def \stvrule{\vrule height 2\stfontheight depth\stfontheight
  537.                         width\strulethickness }
  538. \def \sectitlebox #1<{\vbox{\sthrule
  539.         \hbox to \hsize{\stvrule\hfil #1\hfil\vrule width\strulethickness }%
  540.         \sthrule }}
  541. \def \secsep{\vskip 5\baselineskip}
  542. \newif\ifSecTitle
  543. \SecTitlefalse
  544. \def \sectitle #1<{\par \SecTitletrue
  545.         \penalty-1000\secsep
  546.         \n@stnum=0
  547.         {\def\\{ }\setbox\T@stBox=\hbox{\titlefont#1}%
  548.         \ifdim\wd\T@stBox < \hsize \def\result{\unhbox\T@stBox}%
  549.         \else \def\\{\cr\noalign{\global\advance\n@stnum by 1 }}%
  550.                 \setbox\T@stBox=\vbox{\titlefont
  551.                         \halign{\hfil##\hfil\cr#1\crcr}}%
  552.                 \def\result{\vbox{\unvbox\T@stBox}}\fi
  553. %        \ifnum\n@stnum=1 \def\stvrule{\vrule height 3.5\stfontheight
  554. %                        depth\stfontheight width\strulethickness }\fi
  555.         \ifnum\n@stnum>0 \def\stvrule{\T@stDimen=\n@stnum\titlefontbaselineskip
  556.                         \advance\T@stDimen by-\titlefontbaselineskip
  557.                         \advance\T@stDimen by 3.5\stfontheight
  558.                         \vrule height \T@stDimen depth\stfontheight
  559.                                 width\strulethickness }\fi
  560.         \centerline{\sectitlebox \titlefont\result<}}%
  561.         \nobreak \vskip\baselineskip }
  562. %\def \secsep{\vskip\baselineskip       %  * * *  as for TUGboat pre 5#2
  563. %       \centerline{\hbox to 180pt{%
  564. %               \leaders\hbox to 15pt{\hfil\char'052\hfil}\hfill}}%
  565. %       \vskip2\baselineskip }
  566. \def \littlesep{\vskip 3pt plus 1pt minus 1pt
  567.         \centerline{\hbox to 90pt{\ignorespaces
  568.                 \leaders\hbox to 10pt{\hfil .\hfil}\hfill} }%
  569.         \vskip 3pt plus 1pt minus 1pt}
  570. % **********************************************************************
  571. %    General mechanism for tags
  572. % Short Form Tagging.
  573. % We specify a character (*) to be used as a begin/end delimiter
  574. % for the argument to most tags.  This code could be copied and
  575. % altered a bit to use another character.
  576. \newtoks\@activeShortFormDelimiter
  577. \def\AstChar{*}
  578. {\makeactive\*
  579. \gdef\makeastSFD{%
  580.   \@activeShortFormDelimiter={*}%
  581.   \edef\@ShortFormDelimiter{\AstChar}%
  582.   \expandafter\let\expandafter\@@ShortFormDelimiter\AstChar
  583. \makeastSFD
  584. \let\@plainast=\ast
  585. \def\ast{\ifmmode\@plainast\else \AstChar\fi}
  586. % Checking ahead.
  587. % Often we check ahead to see what course of action to take next.
  588. % This is used to check for optional commands, to check for the
  589. % short-form delimiter, and to ignore characters in certain
  590. % situations.  This is just a check; applications must do whatever
  591. % is appropriate with the ensuing token.
  592. % The following checks the next token against argument #1.  If the
  593. % two are the same, #2 is executed, otherwise #3.  The comparison is
  594. % done with \ifx.  Since we check ahead with \futurelet, the first
  595. % argument must be stored with \let as well.  To include the case
  596. % where #1 may be a space, we have to go through a small contortion
  597. % to \let\@basetoken= that space.
  598. \long\def\@checknexttoken #1#2#3{%
  599.   \def\?{\ifx\@basetoken}%
  600.   \futurelet\@basetoken\?#1\fi
  601.   \def\@todo{%
  602.     \ifx \@nexttoken\@basetoken\def\@next{#2}\else\def\@next{#3}\fi\@next}%
  603.   \futurelet\@nexttoken\@todo}
  604. % Eliminating characters from input.
  605. % The following check ahead to see whether the next token is a
  606. % token to be parsed from the input stream.  \@ignoreall keeps
  607. % checking to eliminate all such characters.  Argument #2 is
  608. % executed afterwards.
  609. % The token is removed by defining a control sequence whose
  610. % contextual form includes the token.
  611.         % execute #2 after ignoring (possibly) one occurrence of #1
  612. \long\def\@ignoreone#1#2{%
  613.   \def\@ignoreform#1{#2}%
  614.   \@checknexttoken{#1}{\@ignoreform}{#2}%
  615.         % execute #2 after ignoring all occurrences of #1
  616. \long\def\@ignoreall#1#2{%
  617.   \def\@ignoreform#1{\@ignoretest}%
  618.   \def\@ignoretest{\@checknexttoken{#1}{\@ignoreform}{#2}}%
  619.   \@ignoretest
  620. % Particularly useful ignorances
  621.         % execute #1 after ignoring spaces
  622. \def\DeleteOptionalSpaces#1{%
  623.   \@ignoreall{ }{#1}%
  624.         % execute #1 after ignoring spaces and \pars
  625. \def\DeleteOptionalSpacesandPars#1{%
  626.   \@ignoreall{ }{\@ignoreall{\par}{#1}}%
  627.         % execute #1 after ignoring active spaces
  628. {\catcode`\ =\active
  629. \gdef\DeleteOptionalActiveSpaces#1{\@ignoreall{ }{#1}}%
  630. % Checking and reading options.
  631. % To check for the next optional argument, the macros must usually look
  632. % ahead to the next character, proceding accordingly depending on
  633. % whether that character is a [.  This check may be suppressed if
  634. % the user has executed the \lastoption option.  If \@lastoption is
  635. % "true" or if the [ is NOT next, the macro goes on to reading any
  636. % arguments and executing appropriately.
  637. \def\@checkoptions{%
  638.   \if@lastoption
  639.     \def\@next{\@executetoend}%
  640.   \else
  641.     \def\@next{\@checknexttoken {[}{\@readoptions}{\@executetoend}}%
  642.   \fi
  643.   \@next
  644. % Default "options" on start-up: macros must examine input to
  645. % determine when last option occurs and whether short-form is being used.
  646. \newif\if@lastoption            \@lastoptionfalse
  647. \def\lastoption{\@lastoptiontrue}
  648. \newif\if@longform              \@longformfalse
  649. \def\longform{\@longformtrue}
  650. \newif\if@savingargument        \@savingargumentfalse
  651. \newtoks\enddelim
  652. \def\@defaultoptions{%
  653.   \@lastoptionfalse
  654.   \@longformfalse
  655.   \@savingargumentfalse
  656.   \enddelim=\expandafter{\csname end\CurrentTag\endcsname}%
  657. % To read an optional command, \catcodes of \ { } are restored to their plain
  658. % values, and the [...] form is parsed out by \@@readoptions.  The argument
  659. % to \@@readoptions is then executed, the 3 specials are restored and
  660. % the we check again for [ after deleting spaces.
  661. \def\@readoptions{%
  662.   \savecat\\\makeescape\\%
  663.   \savecat\{\makebgroup\{%
  664.   \savecat\}\makeegroup\}%
  665.   \@@readoptions}
  666. \def\@@readoptions[#1]{%
  667.   #1%
  668.   \restorecat\\\restorecat\{\restorecat\}%
  669.   \DeleteOptionalSpaces{\@checkoptions}%
  670. % Reading to the end-tag.
  671. % Macros may just do their business after options have been
  672. % read.  In this case, there is no end-tag to worry about.
  673. % Otherwise, the macros either read to the "long-form" of end-tag
  674. % (e.g. \endtitle or \endauthor) or pull out the argument delimited
  675. % by the short-form delimiter.  Unless an option has specified
  676. % that the long-form is to be used, the macros look ahead to
  677. % see whether the short-form delimiter occurs next.  If so,
  678. % it is assumed that the short-form is being used.
  679. \newcount\@numarguments         \@numarguments=1
  680. \def\@executetoend{%
  681.   \ifnum\@numarguments>0
  682.     \if@longform \def\@next{\@longparse}%
  683.     \else
  684.       \def\@next{\@checknexttoken
  685.                   {\@@ShortFormDelimiter}{\@shortparse}{\@longparse}}%
  686.     \fi
  687.   \else
  688.     \def\@next{\csname @begin\CurrentTag\endcsname}%
  689.   \fi
  690.   \@next
  691. % If the short-form is being used, we must define a "form" which
  692. % TeX may follow to pull out the tag's argument.  This form is
  693. % then called, the argument is stored away in the token register
  694. % \@argument, and the appropriate end-operation is performed.
  695. \newtoks\@argument
  696. \def\@shortparse{%
  697.   \if@savingargument
  698.     \edef\@form{%
  699.       \def\noexpand\@@shortparse\@ShortFormDelimiter####1\@ShortFormDelimiter}%
  700.     \@form{\@argument{##1}\csname end\CurrentTag\endcsname}%
  701.   \else
  702.     \expandafter\makeactive\csname\@ShortFormDelimiter\endcsname
  703.     \expandafter\def\the\@activeShortFormDelimiter
  704.       {\csname end\CurrentTag\endcsname
  705.        \expandafter\makeother\csname\@ShortFormDelimiter\endcsname}%
  706.     \def\@@shortparse{%
  707.       \expandafter\@ignoreone\expandafter{\@ShortFormDelimiter}%
  708.         {\csname @begin\CurrentTag\endcsname}%
  709.       }%
  710.   \fi
  711.   \@@shortparse}
  712. % On the other hand, if the long form is used, TeX must parse to
  713. % the long-form ending tag.  Ordinarily we know the ending-tag
  714. % because it is just the \end... which corresponds to the tag
  715. % which initiated the process.  We do allow for the possibility,
  716. % however, that we may want to switch this for some reason. E.g.
  717. % the different \verbatim styles allow for \verbatim...\endverbatim
  718. % and ||...||.  The easiest way to implement the || style is
  719. % to have the first || call \verbatim and have \verbatim know
  720. % to look for || as the end-tag instead of \endverbatim.  This may
  721. % be accomplished by allowing for the possibility of different
  722. % end-tags as below.
  723. \def\@longparse{%
  724.   \if@savingargument
  725.     \edef\@form{\def\noexpand\@@longparse####1\the\enddelim}%
  726.     \@form{\global\@argument{##1}\csname end\CurrentTag\endcsname}%
  727.   \else
  728.     \def\@@longparse{%
  729.       \csname @begin\CurrentTag\endcsname
  730.       }%
  731.   \fi
  732.   \@@longparse
  733. % ********************************************************
  734. % title, authors, addresses
  735. % *****************
  736. % title
  737. \def\title{%
  738.   \begingroup
  739.   \def\CurrentTag{title}%
  740.   \@defaultoptions
  741.   \@savingargumenttrue
  742.   \@checkoptions}
  743. \def\endtitle{%
  744.   \global\toks@=\expandafter{\the\@argument}%
  745.   \endgroup
  746.   \edef\thetitle{\ignorespaces\the\toks@\unskip}%
  747. % *****************
  748. % authors
  749. \newcount\authornumber
  750. \def\author{%
  751.   \begingroup
  752.   \def\CurrentTag{author}%
  753.   \global\advance\authornumber by 1
  754.   \@defaultoptions
  755.   \@savingargumenttrue
  756.   \@checkoptions}
  757. \def\endauthor{%
  758.   \global\toks@=\expandafter{\the\@argument}%
  759.   \endgroup
  760.   \expandafter\edef\csname theauthor\number\authornumber\endcsname
  761.       {\ignorespaces\the\toks@\unskip}%
  762. % *****************
  763. % addresses
  764. \def\address{%
  765.   \begingroup
  766.   \def\CurrentTag{address}%
  767.   \@defaultoptions
  768.   \@savingargumenttrue
  769.   \let\@addressstyle=\@authorstyle
  770.   \def\inline{\let\@addressstyle=\@inlinestyle}%
  771.   \def\display{\let\@addressstyle=\@displaystyle}%
  772.   \@checkoptions}
  773. \def\endaddress{%
  774.   \ifx\@addressstyle\@inlinestyle
  775.     \def\\{, }\the\@argument
  776.     \endgroup
  777.     \def\@next{}%
  778.   \else\ifx\@addressstyle\@displaystyle
  779.     \par\raggedright
  780.     \everypar={\hangindent 1.5\parindent}%
  781.     \def\\{\endgraf}%
  782.     \def\|{\unskip\hfil\break}%
  783.     \vskip\abovedisplayskip
  784.     \the\@argument\par
  785.     \vskip\belowdisplayskip
  786.     \@asifbelowdisplay
  787.     \endgroup
  788.     \def\@next{\ignorespaces}%
  789.   \else
  790.     \global\toks@=\expandafter{\the\@argument}%
  791.     \endgroup
  792.     \expandafter\edef\csname theaddress\number\authornumber\endcsname
  793.       {\ignorespaces\the\toks@\unskip}%
  794.     \def\@next{}%
  795.   \fi \fi
  796.   \@next
  797. % *****************
  798. % network addresses
  799. \def\netaddress{%
  800.   \begingroup
  801.   \def\CurrentTag{netaddress}%
  802.   \@defaultoptions
  803.   \@savingargumenttrue
  804.   \let\@network\relax%
  805.   \def\network##1{\def\@network{##1: }}%
  806.   \@SpecialsGetOther
  807.   \netaddrat
  808.   \netaddrpercent
  809.   \@checkoptions}
  810. {\makeactive\@
  811.  \gdef\netaddrat{\makeactive\@\def@{\char"40\discretionary{}{}{}}}
  812.  \makeactive\%
  813.  \gdef\netaddrpercent{\makeactive\%\def%{\char"25\discretionary{}{}{}}}
  814. % We want the definition of \thenetaddress... to land at the right
  815. % nesting level, so we have to first pull it to the top, then
  816. % drop back to where we are.
  817. \def\endnetaddress{%
  818.   \global\toks@=\expandafter{\the\@argument}%
  819.   \ifx\@network\relax
  820.     \gdef\@@network{}%
  821.   \else
  822.     \xdef\@@network{\@network}%
  823.   \fi
  824.   \endgroup
  825.   \expandafter\edef\csname thenetaddress\number\authornumber\endcsname
  826.     {{\noexpand\rm\@@network}%
  827.      {\noexpand\netaddrat\noexpand\netaddrpercent\noexpand\net
  828.       \ignorespaces\the\toks@\unskip}}%
  829. \def\net{\tt}
  830. % Overrides to default author and signature formats
  831. \def\authorlist#1{\def\@authorlist{#1}}
  832. \def\signature#1{\def\@signature{#1}}
  833. \def\signaturemark{\leavevmode\llap{$\diamond$\enspace}}
  834. \def\theauthor#1{\csname theauthor#1\endcsname}
  835. \def\theaddress#1{\csname theaddress#1\endcsname}
  836. \def\thenetaddress#1{\csname thenetaddress#1\endcsname}
  837. \def\@defaultsignature{%
  838.   \count@=0
  839.   \loop
  840.   \ifnum\count@<\authornumber
  841.     \medskip
  842.     \advance\count@ by \@ne
  843.     \signaturemark
  844.     \theauthor{\number\count@}\\
  845.     \theaddress{\number\count@}\\
  846.     \thenetaddress{\number\count@}\\
  847.   \repeat
  848. \def\makesignature{%
  849.   \par
  850.   \rightline{%
  851.     \vbox{\hsize=12pc \ninepoint \raggedright
  852.       \parindent \z@ \everypar={\global\hangindent 1pc }
  853.       \parskip \z@
  854.       \netaddrat
  855.       \netaddrpercent
  856.       \def\|{\unskip\hfil\break}%
  857.       \def\\{\endgraf}%
  858.       \def\net{\tt}%
  859.       \def\phone{\rm Phone: } \rm
  860.       \bigskip
  861.       \@signature}}
  862. \newcount\count@@
  863. \def\article{%
  864.   \@allowspanningfigsfalse
  865.   \ifSecTitle \global\SecTitlefalse
  866.   \else \vskip\AboveTitleSkip
  867.     \kern\topskip
  868.     \hrule height\z@ depth\z@ width 10pt
  869.     \kern-\topskip
  870.     \kern-\strulethickness
  871.     \hrule height\strulethickness depth\z@
  872.     \kern\medskipamount
  873.   \fi
  874.   \ifx\thetitle\relax
  875.   \else
  876.     \noindent{\def\\{\unskip\hfil\break}\raggedright\bf
  877.               \ignorespaces\thetitle\unskip\par}%
  878.   \fi
  879.   \ifnum\authornumber>0
  880.   \nobreak
  881.   \vskip4pt
  882.   {\def\\{\unskip\hfil\break}\hangindent\parindent\raggedright
  883.    \@authorlist\par}
  884.   \fi
  885.   \nobreak
  886.   \vskip \BelowTitleSkip
  887.   \tenpoint
  888.   \DeleteOptionalSpacesandPars{\noindent\ignorespaces}%
  889. \def\@defaultauthorlist{%
  890.    \count@=\authornumber
  891.    \advance\count@ by -2
  892.    \count@@=0
  893.    \loop
  894.    \ifnum\count@>0
  895.       \advance\count@@ by 1
  896.       \ignorespaces\csname theauthor\number\count@@\endcsname\unskip,
  897.       \advance\count@ by -1
  898.    \repeat
  899.    \count@=\authornumber
  900.    \advance\count@ by -\count@@
  901.    \ifnum\authornumber>0
  902.      \ifnum\count@>1
  903.        \count@=\authornumber
  904.        \advance\count@ by -1
  905.        \ignorespaces\csname theauthor\number\count@\endcsname\unskip\ and
  906.        \fi
  907.      \ignorespaces\csname theauthor\number\authornumber\endcsname\unskip
  908.    \fi
  909. \def\endarticle{\vfil\end}                      % redefined in drivers
  910. % ********************************************************
  911. % Heads.
  912. \newcount\headlevel     \headlevel=1
  913. \newif\if@removeprewhite        \@removeprewhitefalse
  914. \newif\if@removepostwhite       \@removepostwhitefalse
  915. \def\removeprewhite{\@removeprewhitetrue}
  916. \def\removepostwhite{\@removepostwhitetrue}
  917. \def\head{%
  918.   \begingroup
  919.   \def\CurrentTag{head}%
  920.   \@allowindentfalse
  921.   \@defaultoptions
  922.   \@savingargumenttrue
  923.   \def\\{\break}%
  924.   \@checkoptions}
  925. \def\endhead{%
  926.   \par
  927.   \ifcase\headlevel\or
  928.    \if@removeprewhite\else\vskip\baselineskip\fi
  929.    \noindent{\raggedright\bf\ignorespaces\the\@argument\unskip\par}%
  930.    \if@removepostwhite\else\kern0.5\baselineskip\fi
  931.    \nobreak
  932.    \gdef\@next{%
  933.      \if@allowindent\def\@next{}%
  934.      \else\def\@next{\DeleteOptionalSpacesandPars{\noindent\ignorespaces}}\fi
  935.      \@next
  936.    }%
  937.   \or
  938.    \if@removeprewhite\else\medskip\fi
  939.    \noindent{\bf\ignorespaces\the\@argument\unskip.}\hskip0.5em
  940.    \gdef\@next{\DeleteOptionalSpacesandPars{}}%
  941.   \or
  942.    {\bf\ignorespaces\the\@argument\unskip}\hskip0.5em
  943.    \gdef\@next{\DeleteOptionalSpacesandPars{}}%
  944.   \fi
  945.   \endgroup
  946.   \@next
  947. \def\subhead{\head[\headlevel=2]}
  948. \def\subsubhead{\head[\headlevel=3]}
  949. \newif\if@allowindent
  950. \def\allowindent{\global\@allowindenttrue}
  951. % *************************************************************************
  952. % Text and subtext.
  953. \newcount\textlevel     \textlevel=1
  954. \def\text{%
  955.   \begingroup
  956.   \def\CurrentTag{text}%
  957.   \@defaultoptions
  958.   \@savingargumentfalse
  959.   \@checkoptions}
  960. \def\@begintext{%
  961.   \par
  962.   \ifcase\textlevel\or
  963.   \or
  964.     \vskip\abovedisplayskip
  965.     \advance\leftskip by 0.5\parindent
  966.     \advance\rightskip by 0.5\parindent
  967.     \ninepoint\rm
  968.   \fi
  969. \def\endtext{%
  970.   \ifcase\textlevel\or
  971.     \gdef\@next{}%
  972.   \or
  973.     \par
  974.     \vskip\belowdisplayskip
  975.     \@asifbelowdisplay
  976.     \gdef\@next{\ignorespaces}%
  977.   \fi
  978.   \endgroup
  979.   \@next
  980. \def\subtext{\text[\textlevel=2]}
  981. \def\raggedcenter{%
  982.   \dimen@=\leftskip
  983.   \leftskip= 0pt plus 1000pt
  984.   \advance\leftskip by \dimen@
  985.   \dimen@=\rightskip
  986.   \rightskip= 0pt plus 1000pt
  987.   \advance\rightskip by \dimen@
  988.   \parindent=0pt
  989.   \parfillskip=0pt
  990. % *************************************************************************
  991. % Lists.
  992. \newcount\listlevel     \listlevel=1
  993. \newif\if@itemized      \@itemizedtrue
  994. \newif\if@numbered      \@numberedfalse
  995. \newcount\itemnumber    \itemnumber=0
  996. \newif\if@ruled         \@ruledfalse
  997. \newtoks\@itemtag       \@itemtag={$\bullet$}
  998. \newcount\@cols         \@cols=1
  999. \newdimen\@listindent
  1000. \newdimen\@listhangindent
  1001. \newif\if@firstitem     \@firstitemtrue
  1002. \def\@itemseparator{, }
  1003. \def\tagform#1{\llap{#1\enspace}}
  1004. \newdimen\outerparindent
  1005. \def\list{%
  1006.   \begingroup
  1007.   \def\CurrentTag{list}%
  1008.   \let\@liststyle=\@displaystyle
  1009.   \def\inline{\let\@liststyle=\@inlinestyle}%
  1010.   \def\display{\let\@liststyle=\@displaystyle}%
  1011.   \def\displaystyle##1{\def\@altdisplaystyle{##1}}%
  1012.   \def\inlinestyle##1{\def\@altinlinestyle{##1}}%
  1013.   \def\item{%
  1014.     \begingroup
  1015.     \def\CurrentTag{item}%
  1016.     \@numarguments=0
  1017.     \@checkoptions}%
  1018.   \def\tag##1{\@itemtag{##1}}%
  1019.   \def\unitemized{\@itemizedfalse\@itemtag{}}%
  1020.   \def\numbered{\@itemtag={\number\itemnumber.}}%
  1021.   \def\romannumeraled{\@itemtag={\romannumeral\itemnumber.}}%
  1022.   \def\lettered{\itemnumber="60 \@itemtag={\char\itemnumber.}}%
  1023.   \def\Lettered{\itemnumber="40 \@itemtag={\char\itemnumber.}}%
  1024.   \def\ruled{\@ruledtrue}%
  1025.   \def\cols{\@cols}%
  1026.   \def\itemseparator##1{\def\@itemseparator{##1}}%
  1027.   \@defaultoptions
  1028.   \@savingargumentfalse
  1029.   \@checkoptions}
  1030. \def\@beginlist{%
  1031.   \ifnum\listlevel=1 \outerparindent=\parindent \fi
  1032.   \ifx\@liststyle\@displaystyle
  1033.     \par
  1034.     \ifnum\listlevel=1
  1035.       \if@ruled \medskip \hrule\kern5pt \nobreak
  1036.       \else \if@removeprewhite\else\vskip\abovedisplayskip \fi\fi
  1037.     \fi
  1038.     \advance\leftskip by \outerparindent
  1039.     \outerparindent=0.5\outerparindent
  1040.     \@listindent=\outerparindent
  1041.     \@listhangindent=\outerparindent
  1042.     \if@itemized
  1043.       \parindent\@listindent
  1044.     \else
  1045.       \parindent=\z@
  1046.       \parskip=\z@
  1047.       \raggedright
  1048.       \everypar={\advance\itemnumber\@ne
  1049.                  \tagform{\the\@itemtag}\strutt
  1050.                  \hangindent\@listhangindent}%
  1051.       \makeCtrlMendgraf
  1052.     \fi
  1053.     \def\colsep{%
  1054.       \global\count@\itemnumber
  1055.       \egroup
  1056.       \vtop\bgroup
  1057.       \itemnumber=\count@\ignoreendline}%
  1058.     \ifnum\@cols>1
  1059.       \divide\hsize by\@cols
  1060.       \hbox\bgroup\vtop\bgroup
  1061.     \fi
  1062.     \@altdisplaystyle
  1063.   \else
  1064.     \if@itemized
  1065.     \else
  1066.        \makeCtrlMseparator
  1067.        \advance\itemnumber by \@ne
  1068.        \the\@itemtag\ %
  1069.     \fi
  1070.   \def\colsep{}%
  1071.   \@altinlinestyle
  1072.   \fi
  1073. \def\endlist{%
  1074.   \ifx\@liststyle\@displaystyle
  1075.     \if@itemized\par\fi
  1076.     \ifnum\@cols>1
  1077.       \egroup   % vtop
  1078.       \egroup   % hbox
  1079.     \fi
  1080.     \ifnum\listlevel=1
  1081.       \nointerlineskip\null
  1082.       \if@ruled \kern5pt\hrule\nobreak\vskip2\medskipamount
  1083.       \else \nobreak
  1084.         \if@removepostwhite\else\vskip\belowdisplayskip\fi
  1085.       \fi
  1086.       \@asifbelowdisplay
  1087.     \fi
  1088.   \else
  1089.   \fi
  1090.   \endgroup     % list
  1091. \def\sublist{\list[\listlevel=2]}
  1092. \newtoks\everyitem      \everyitem{}
  1093. \def\@beginitem{%
  1094.   \ifx\@liststyle\@displaystyle
  1095.     \par
  1096.     \parindent\z@
  1097.     \if@firstitem\@firstitemfalse\else\vskip\smallskipamount\fi
  1098.     \advance\itemnumber by \@ne
  1099.     \noindent\leavevmode
  1100.     \the\everyitem
  1101.     \tagform{\the\@itemtag}\strutt
  1102.   \else
  1103.     \def\item{\if@firstitem\@firstitemfalse\else\unskip\@itemseparator\fi
  1104.               \advance\itemnumber by \@ne\the\@itemtag\enspace}%
  1105.   \fi
  1106.   \global\count@\itemnumber
  1107.   \endgroup
  1108.   \itemnumber\count@
  1109. % ********************************************************
  1110. % Verbatim.
  1111. % Operation here is very similar to that for the other tags.
  1112. % The opening tag sets up the situation and looks for optional
  1113. % commands and the short-form delimiters.  Since initial setup
  1114. % involves changing the special characters to characters of
  1115. % type other, some juggling must be done when optional commands
  1116. % are read.  In addition, to allow for implementation of the
  1117. % |...| style using the more verbose \verbatim...\endverbatim,
  1118. % we parameterize the ending-delimiter.
  1119.         % sets default to display style
  1120. \def\verbatim{\@verbatim[\display]}
  1121. \def\@verbatim{%
  1122.   \begingroup
  1123.   \setupverbatim
  1124.   \@checkverboptions
  1125. \def\setupverbatim{%
  1126.   \def\CurrentTag{verbatim}%
  1127.   \@defaultoptions
  1128.   \def\inline{\global\let\@verbstyle\@inlinestyle}%
  1129.   \def\display{\global\let\@verbstyle\@displaystyle}%
  1130.   \def\displaystyle##1{\def\@altdisplaystyle{##1}}%
  1131.   \def\inlinestyle##1{\def\@altinlinestyle{##1}}%
  1132.   \def\numbered{\@numberedtrue}%
  1133.   \def\ruled{\@ruledtrue}%
  1134.   \@SpecialsGetOther
  1135.   \obeyspaces \obeylines \hyphenpenalty=10000
  1136.   \the\everyverbatim
  1137. \def\@authorstyle{\@@@a}
  1138. \def\@inlinestyle{\@@@i}
  1139. \def\@displaystyle{\@@@d}
  1140. \def\@altinlinestyle{}
  1141. \def\@altdisplaystyle{}
  1142. \def\@SpecialsGetOther{%
  1143.   \catcode`\\=\other
  1144.   \catcode`\{=\other \catcode`\}=\other \catcode`\$=\other
  1145.   \catcode`\&=\other \catcode`\#=\other \catcode`\%=\other
  1146.   \catcode`\~=\other \catcode`\_=\other \catcode`\^=\other
  1147.   \catcode`\"=\other \catcode`\@=\other
  1148.   \the\@AdditionsToSpecialsGetOther}
  1149. % The \@Additions... register above should be used whenever another
  1150. % character is declared to be special for some purpose.  E.g.,
  1151. % we will use the | for the short-form |...| verbatim notation.
  1152. % Since the | is generally active for this purpose, it's category
  1153. % won't get changed to \other for use in \verbatim...\endverbatim
  1154. % unless we add it via this mechanism.
  1155. \newtoks\@AdditionsToSpecialsGetOther
  1156. \def\AddToSpecialsGetOther#1{%
  1157.   \@AdditionsToSpecialsGetOther=
  1158.    \expandafter{\the\@AdditionsToSpecialsGetOther#1}}
  1159. % From David Eppstein's ``Trees'' paper (6#1), preserve initial spaces.
  1160. \def\verbatimspace{\ifvmode\indent\fi\space}
  1161. {\obeyspaces\gdef\makespaceverbspace{\def {\verbatimspace}}}
  1162. % Altering the verbatim setup.
  1163. % Users can alter the setup to their purpose by calling
  1164. % putting tokens in the register \everyverbatim.
  1165. \newtoks\everyverbatim
  1166. \def\@checkverboptions{%
  1167.   \if@lastoption
  1168.     \def\@next{\@executetoendverb}%
  1169.   \else
  1170.     \def\@next{\@checknexttoken {[}{\@readverboptions}{\@executetoendverb}}%
  1171.   \fi
  1172.   \@next
  1173. \def\@readverboptions{%
  1174.   \savecat\\\makeescape\\%
  1175.   \savecat\{\makebgroup\{%
  1176.   \savecat\}\makeegroup\}%
  1177.   \savecat\ \makespace\ %
  1178.   \savecat\^^M\makeeol\^^M%
  1179.   \@@readverboptions}
  1180. \def\@@readverboptions[#1]{%
  1181.   #1%
  1182.   \restorecat\\\restorecat\{\restorecat\}%
  1183.   \restorecat\ \restorecat\^^M%
  1184.   \DeleteOptionalActiveSpaces{\@checkverboptions}%
  1185. \def\@executetoendverb{%
  1186.   \if@longform
  1187.     \def\@next{\@longparseverbatim}%
  1188.   \else
  1189.     \def\@next{\@checknexttoken
  1190.       {\@@ShortFormDelimiter}{\@shortparseverbatim}{\@longparseverbatim}}%
  1191.   \fi
  1192.   \@next
  1193. \def\@shortparseverbatim{%
  1194.   \edef\@form{%
  1195.  \def\noexpand\@@shortparseverbatim\@ShortFormDelimiter####1\@ShortFormDelimiter}%
  1196.   \@form{\global\@argument{##1}\csname end\CurrentTag\endcsname}%
  1197.   \@ignoreone{\@@ShortFormDelimiter}%
  1198.     {\@ignoreCtrlM{\expandafter\@@shortparseverbatim\@ShortFormDelimiter}%
  1199.     }%
  1200. \def\@longparseverbatim{%
  1201.   \toks@=\expandafter{\endverbdelimiter}%
  1202.   \edef\@form{\def\noexpand\@@longparseverbatim####1\the\toks@}%
  1203.   \@form{\global\@argument{##1}\endverbatim}%
  1204.   \@ignoreCtrlM{\@@longparseverbatim}}
  1205. {\catcode`\|=0 \catcode`\\=\other
  1206. |gdef|endverbdelimiter{\endverbatim}}
  1207. \def\inputfromvar#1{\def\@verbinputvar{#1}}%
  1208. \def\inputfromfile#1{\def\@verbinputfile{#1 }}%
  1209. \let\@verbinputvar\relax
  1210. \let\@verbinputfile\relax
  1211. \newif\if@outputtotype  \@outputtotypetrue
  1212. \def\notype{\@outputtotypefalse}
  1213. \def\outputtovar#1{\def\@verboutputvar{#1}}
  1214. \def\outputtofile#1{\def\@verboutputfile{#1}}
  1215. \let\@verboutputvar\relax
  1216. \let\@verboutputfile\relax
  1217. \def\endverbatim{%
  1218.  \if@outputtotype
  1219.   \tt
  1220.   \ifx\@verbstyle\@inlinestyle
  1221.     \@beforeverbinline
  1222.     \@altinlinestyle
  1223.   \else
  1224.     \@beforeverbdisplay
  1225.     \@altdisplaystyle
  1226.   \fi
  1227.   \ifx\@verbinputvar\relax\else
  1228.     \csname\@verbinputvar\endcsname
  1229.   \fi
  1230.   \ifx\@verbinputfile\relax\else
  1231.     \input \@verbinputfile
  1232.     \@endverbatim
  1233.   \fi
  1234.   \expandafter\@ignoreendverbatim\the\@argument\@endverbatim
  1235.   \ifx\@verbstyle\@inlinestyle
  1236.     \@afterverbinline
  1237.   \else
  1238.     \@afterverbdisplay
  1239.   \fi
  1240.  \ifx\@verboutputvar\relax\else
  1241.    \expandafter\xdef\csname\@verboutputvar\endcsname{\the\@argument}%
  1242.  \ifx\@verboutputfile\relax\else
  1243.    \immediate\openout\verboutfile=\@verboutputfile
  1244.    \makeCtrlMnewlinechar
  1245.    \immediate\write\verboutfile{\the\@argument}%
  1246.    \immediate\closeout\verboutfile
  1247.  \ifx\@verbstyle\@inlinestyle
  1248.    \gdef\@next{}\else\gdef\@next{\ignorespaces}\fi
  1249.  \endgroup
  1250.  \@next
  1251. \newwrite\verboutfile
  1252. % Formatting the text.
  1253. % \ttrightskip is the permissible overhang beyond right margin;
  1254. % in MANMAC, this is 5pc, which is fine for the TeXbook, but too much here.
  1255. \newdimen\ttrightskip   \ttrightskip=1pc
  1256. % Allow for line numbers on a listing as well as rules above and below.
  1257. \newcount\linenumber
  1258. \newcount\globallinenumber      \globallinenumber = 0
  1259. \newif\if@continuingnumbers \@continuingnumbersfalse
  1260. \def\continuenumbers{\numbered\@continuingnumberstrue}
  1261. \def\@ignoreendverbatim{\@ignoreone{\@endverbatim}{}}
  1262. \def\verbendline{\leavevmode\null\endgraf}
  1263. \def\makeCtrlMactive{\catcode`\^^M=\active}
  1264. {\makeCtrlMactive
  1265. \gdef\makeCtrlMverbendline{\def^^M{\makeCtrlMactive%
  1266.   \@ignoreone{\@endverbatim}{\verbendline}}}%
  1267. \gdef\makeCtrlMverbspace{\makeCtrlMactive\def^^M{\verbatimspace}}%
  1268. \gdef\makeCtrlMnewlinechar{\newlinechar=`\^^M}%
  1269. \gdef\makeCtrlMendgraf{\makeCtrlMactive\def^^M{\strutt\endgraf}}%
  1270. \gdef\makeCtrlMseparator{\makeCtrlMactive%
  1271.   \def^^M{%
  1272.     \@checknexttoken {\endlist}{}{%
  1273.       \@itemseparator\advance\itemnumber by \@ne \the\@itemtag%
  1274.       \unskip\ \ignorespaces}}}%
  1275.         % to read a variable or file name properly, we must interpret
  1276.         % spaces and ^^M as nothing or as spaces
  1277. {\catcode`\^^M=\active\catcode`\ =\active%
  1278. \gdef\makeCtrlMempty{\def^^M{}}%
  1279. \gdef\makespaceempty{\def {}}%
  1280. {\catcode`\^^M=\active\catcode`\ =\active%
  1281. \gdef\makeCtrlMspace{\def^^M{\space}}%
  1282. \gdef\makespacespace{\def {\space}}%
  1283. {\catcode`\^^M=\active%
  1284. \gdef\@ignoreCtrlM#1{\@ignoreone{^^M}{#1}}%
  1285. \gdef\ignoreendline{\@ignoreCtrlM{}}%
  1286. \def\@beforeverbinline{%
  1287.     \makeCtrlMverbspace
  1288.     \let\@endverbatim=\empty
  1289. \def\@beforeverbdisplay{%
  1290.   \def\@endverbatim{\verbendline}%
  1291.   \if@ruled \medskip \hrule\kern5pt \nobreak
  1292.   \else \vskip\abovedisplayskip
  1293.   \fi
  1294.   \makespaceverbspace
  1295.   \makeCtrlMverbendline\parskip=\z@
  1296.   \if@numbered \parindent=\z@
  1297.     \if@continuingnumbers
  1298.     \else \global\globallinenumber = \z@ \fi
  1299.     \linenumber=\z@ \fi
  1300.   \everypar={\global\advance\globallinenumber by\@ne
  1301.           \advance\linenumber by\@ne
  1302.           \ifnum\linenumber<3 \vadjust{\nobreak}\fi
  1303.           \if@numbered \leavevmode
  1304.               \hbox to\normalparindent{\hss\sevenrm\the\globallinenumber.\ }%
  1305.           \fi}%
  1306.   \frenchspacing\rightskip=-\ttrightskip
  1307. \def\@afterverbinline{}
  1308. \def\@afterverbdisplay{%
  1309.   \if@ruled \kern5pt\hrule\nobreak\vskip2\medskipamount
  1310.   \else \nobreak\vskip\belowdisplayskip
  1311.   \fi
  1312.   \@asifbelowdisplay
  1313. \def\@asifbelowdisplay{%
  1314.   \nobreak
  1315.   \vskip-\parskip
  1316.   \vskip-\abovedisplayshortskip
  1317.   \vskip-2\baselineskip
  1318.   \vskip-\belowdisplayshortskip
  1319.   {\everypar{}\everymath{}$$\null$$}%
  1320. % Options and variants.
  1321. \def\verbinline{\verbatim[\inline]}
  1322. \def\verbdisplay{\verbatim[\display]}
  1323. \def\verbfile#1{\verbatim[\inputfromfile{#1}]}
  1324. % Verbatim with the other characters (e.g. |...|).
  1325. % Procedures are made abstract so that it is easy to allow
  1326. % different characters to perform this function.  Any character
  1327. % that's chosen could cause problems if it occurs unexpectedly
  1328. % in the middle of what is supposed to be verbatim text.  We call
  1329. % the current special character for this purpose the "verbchar"
  1330. % and store it in active form in the token register \@verbchar.
  1331. \newtoks\@verbchar
  1332. % On hitting a "verbchar" in the middle of text, TeX must look ahead
  1333. % to see whether the verbchar occurs again.  Since this
  1334. % look-ahead fixes the category of the token examined, we must change
  1335. % the categories of all characters appropriately before looking.
  1336. % We must also "gobble" the second verbchar if we hit one.
  1337. % Depending upon whether 1 or 2 verbchars are found, we call
  1338. % \verbatim with the appropriate style command.  We also use an
  1339. % optional command to change the delimiter which ends this \verbatim
  1340. % block.
  1341. \def\@firstverbchar{%
  1342.   \begingroup
  1343.   \@SpecialsGetOther
  1344.   \makeverbcharactive
  1345.   \expandafter\@checknexttoken\expandafter{\the\@verbchar}%
  1346.     {\expandafter\@ignoreone\expandafter{\the\@verbchar}%
  1347.       {\endgroup\verbatim[\longform\maketwoendverb]}}%
  1348.     {\endgroup\verbatim[\inline\longform\makeoneendverb]}%
  1349. \def\setupverbchar{%
  1350.  \def\makeoneendverb{\catcode\expandafter`\csname\expandafter\string\the\@verbchar\endcsname=
  1351.     \active\edef\endverbdelimiter{\the\@verbchar}}%
  1352.  \def\maketwoendverb{\catcode\expandafter`\csname\expandafter\string\the\@verbchar\endcsname=
  1353.     \active\edef\endverbdelimiter{\the\@verbchar\the\@verbchar}}%
  1354.   \expandafter\let\the\@verbchar\@firstverbchar
  1355.   \makeverbcharactive
  1356.   \AddToSpecialsGetOther{%
  1357.   \catcode\expandafter`\csname\expandafter\string\the\@verbchar\endcsname=\other}
  1358. \def\makeverbcharactive{%
  1359.  \catcode\expandafter`\csname\expandafter\string\the\@verbchar\endcsname=\active
  1360. {\makeother\| \gdef\VertChar{|}}
  1361. {\makeactive\|
  1362. \gdef\makevertverbchar{%
  1363.   \@verbchar={|}%
  1364.   \setupverbchar
  1365. {\makeother\! \gdef\WowChar{!}}
  1366. {\makeactive\!
  1367. \gdef\makewowverbchar{%
  1368.   \@verbchar={!}%
  1369.   \setupverbchar
  1370. \def\MTH{$}
  1371. \def\sb{_}
  1372. \def\sp{^}
  1373. \def\SP{{\tt\char"20 }}         % "visible" space
  1374. \chardef\bs=`\\
  1375. \def\vrt{{\tt\char`\|}}
  1376. \def\brokenvert{\hbox to 5.24998pt{\hfill
  1377.   \lower 1.5pt\vbox to 8.5pt{\hrule width .9pt height 3.25pt
  1378.   \vfill\hrule width .9pt height 3.25pt}\hfill}}
  1379. \def\@lt{$<$}
  1380. \def\@gt{$>$}
  1381. {\makeactive\<
  1382. \gdef\enablemetacode{\makeactive\<\def<##1>{%
  1383.   $\langle${\it\makeCtrlMspace\makespacespace##1\/}$\rangle$}}}
  1384. % ************************************************************************
  1385. % Figures.
  1386. \newif\if@@mid  \@@midfalse
  1387. \newif\if@@bot  \@@botfalse
  1388. \def\@caption{}
  1389. \newif\if@fixed \@fixedfalse
  1390.         % items for top and bottom ``banners'' on first page
  1391. \def \resetfirsthead{\global\toplgt=\z@ \gdef\firsthead{}}
  1392. \resetfirsthead
  1393. \newbox\firsth@@d       \newbox\firsth@ad
  1394. \def \resetfirstfoot{\global\botlgt=\z@ \gdef\firstfoot{}}
  1395. \resetfirstfoot
  1396. \newbox\firstf@@t       \newbox\firstf@ot
  1397. \newif\if@allowspanningfigs
  1398. \newcount\@figurepage
  1399. \newcount\@figurescol
  1400. \newcount\@figureecol
  1401. \def\figure{%
  1402.   \begingroup
  1403.   \def\CurrentTag{figure}%
  1404.   \@defaultoptions
  1405.   \@savingargumentfalse
  1406.   \def\top{}%
  1407.   \def\bot{\@@bottrue}%
  1408.   \def\mid{\@@midtrue}%
  1409.   \def\caption##1{\def\@caption{\ulap{\bigskip##1\smallskip}}}%
  1410.   \def\fixed{\@fixedtrue}%
  1411.   \def\scol{\@figurescol}%
  1412.   \def\ecol{\@figureecol}%
  1413.   \@figurepage=\pageno
  1414.   \@figurescol=1
  1415.   \@figureecol=\numcols
  1416.   \def\page{%
  1417.     \@ignoreall{\space}%
  1418.       {\@ignoreone{=}%
  1419.          {\@ignoreall{\space}%
  1420.             {\@checknexttoken{+}{\@ignoreone{+}{\advance\@figurepage by}}%
  1421.                  {\@figurepage=}%
  1422.             }%
  1423.          }%
  1424.       }%
  1425.     }%
  1426.   \@checkoptions}
  1427. \def\@beginfigure{%
  1428.   \if@fixed
  1429.     \global\ThisIsFirstPagetrue
  1430.     \setbox\T@stBox=\vbox\bgroup \hsize\pagewd
  1431.   \else
  1432.     \if@@mid\midinsert\else\if@@bot\botinsert\else\topinsert\fi\fi
  1433.   \fi
  1434. \def\endfigure{%
  1435.   \@caption
  1436.   \if@fixed
  1437.     \egroup
  1438.     \if@allowspanningfigs
  1439.       \ifnum\@figurepage>\pageno
  1440.         \immediate\write\sixt@@n{^^J
  1441.            Setting multiple column figures currently not allowed on pages^^J
  1442.            other than the first of each article.  Check your source file.^^J}%
  1443.       \else
  1444.         \if@@bot
  1445.           \ifdim \botlgt=\z@ \global\botlgt=\ht\T@stBox \resetpagelgt \fi
  1446.           \global\setbox\firstf@ot=\vbox to \botlgt{\box\T@stBox \vfil}%
  1447.           \global\setbox\firstf@@t=\vbox to \botlgt{\vfil}%
  1448.           \gdef\firstfoot{\ifnum \xcol=2 \copy\firstf@ot
  1449.                                   \else \copy\firstf@@t \fi }%
  1450.         \else
  1451.           \ifdim \toplgt=\z@ \global\toplgt=\ht\T@stBox \resetpagelgt \fi
  1452. %                       assume that \firsth@ad ends with glue, hence no \dp
  1453.           \global\setbox\firsth@ad=\vbox to \toplgt{\box\T@stBox \vfil}%
  1454.           \global\setbox\firsth@@d=\vbox to \toplgt{\vfil}%
  1455.           \gdef\firsthead{\ifnum \xcol=2 \box\firsth@ad
  1456.                                   \else \copy\firsth@@d \fi }%
  1457.         \fi
  1458.       \fi
  1459.     \else
  1460.       \immediate\write\sixt@@n{^^J
  1461.          Setting multiple column figures currently not allowed after^^J
  1462.          article has begun.^^J}%
  1463.     \fi
  1464.   \else \endinsert
  1465.   \fi
  1466.   \endgroup
  1467. \def\twocolfigure{%
  1468.   \figure[\fixed]}
  1469. %       Avoid Spanish punctuation ligatures ?` and !`.
  1470. {\catcode`\`=\active \gdef`{\relax\lq}}
  1471. %       Define a structure that will permit a list (using \obeylines)
  1472. %       to be made into 2 columns, split by \vsplit, indented the
  1473. %       normal \parindent
  1474. \def \NormalizeBlockHeight{\TestCount=1                         % \@ne
  1475.         \TestDimen=\dimen0 \advance\TestDimen by-\topskip
  1476.         \CutOneLine }
  1477. \def \CutOneLine{\advance\TestCount by 1 \advance\TestDimen by-\baselineskip
  1478.         \ifdim\TestDimen < \baselineskip                        % \@ne
  1479.                 \def\result{\TestDimen=\baselineskip
  1480.                         \multiply\TestDimen by \TestCount
  1481.                         \advance\TestDimen by \topskip
  1482.                         \global\dimen0=\TestDimen }%
  1483.         \else \def\result{\CutOneLine }\fi \result }
  1484. \def \twosplit{{\topskip=\baselineskip \splittopskip=\topskip
  1485.         \setbox0=\copy\TestBox
  1486.         \dimen0=\ht\TestBox
  1487.         \NormalizeBlockHeight
  1488.         \divide\dimen0 by 2
  1489.         \setbox\LeftHalf=\vsplit\TestBox to \dimen0
  1490.         \ifdim\ht\TestBox > \ht\LeftHalf
  1491.                 \advance\dimen0 by \baselineskip
  1492.                 \setbox\TestBox=\copy0
  1493.                 \setbox\LeftHalf=\vsplit\TestBox to \dimen0
  1494.         \fi
  1495.         \line{\kern\parindent\valign{##\vfil\cr
  1496.                 \unvbox\LeftHalf\cr\noalign{\hfil}\unvbox\TestBox\cr}}}%
  1497.         \global\setbox0=\null}
  1498. \newbox\LeftHalf
  1499. \newdimen\HalfWd
  1500. \HalfWd=\twocolcolwd
  1501. \advance\HalfWd by-\normalparindent
  1502. \divide\HalfWd by 2
  1503. {\obeylines
  1504. \gdef\twouplist #1{\topskip=\baselineskip \splittopskip=\topskip %
  1505.         \begingroup \parindent=0pt \obeylines
  1506. %                       next line ends with intentional <cr>
  1507.         \def\endtwouplist{
  1508.                         \egroup %               % end of \vbox
  1509.                         \endgroup %             % end of \obeylines group
  1510.                         \twosplit }%
  1511.         \global\setbox\TestBox=\vbox\bgroup\hsize=\HalfWd %
  1512.                 \indent\vrule height\topskip width 0pt #1}%
  1513. %       Tags for special formatting of editor's notes, meeting
  1514. %       attendees lists, etc.  (See also TUGBOT.COM)
  1515. \def \Editor{\noindent To the Editor:\par}
  1516. \def \EdNote #1{\if #1[\unskip\hskip1em [\thinspace\xEdNote\ignorespaces
  1517.         \else \ifFirstPar \else \medskip\noindent \fi
  1518.                 \xEdNote #1\fi }
  1519. \def \Attendee #1 {\par \noindent\hangindent 2\normalparindent
  1520.         \hbox to .5\normalparindent{\hfil #1\thinspace}\ignorespaces}
  1521. %       Footnotes are mainly supported by PLAIN format, with these
  1522. %       exceptions.
  1523. \skip\footins=12pt              % full blank line       % 24pt
  1524. \def\footnoterule{\kern-8pt
  1525.         \hrule width 5pc \kern 7.6pt } % the \hrule is .4pt high
  1526. \newif\ifDelayFirstPar          \DelayFirstParfalse
  1527. \def\vfootnote#1{\ifFirstPar \DelayFirstPartrue \fi
  1528.   \insert\footins\bgroup
  1529.   \interlinepenalty\interfootnotelinepenalty
  1530.   \splittopskip\ht\strutbox % top baseline for broken footnotes
  1531.   \splitmaxdepth\dp\strutbox \floatingpenalty\@MM
  1532.   \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip
  1533.   \eightpoint\rm
  1534.   \parindent=\normalparindent % always indent footnotes; added for TUGboat
  1535.   \textindent{#1}\footstrut\futurelet\next\fo@t}
  1536. \def\@foot{\strut\egroup
  1537.         \ifDelayFirstPar \SetupFirstPar \global\DelayFirstParfalse \fi }
  1538. \newif\ifFirstPar       \FirstParfalse
  1539. \def\SetupFirstPar{\global\parindent=0pt \global\FirstPartrue }
  1540. %       Draw a box around a whole page, e.g. announcements page;
  1541. %       format must be \onenarrow or \onemedium, and start on a new page.
  1542. \def \bigbox{\hrule \hbox\bgroup \vrule\kern 1pc
  1543.         \vbox\bgroup \vskip 1pc }
  1544. \def \endbox{\endgraf \vskip 1pc \egroup \kern 1pc\vrule \egroup \hrule }
  1545. %       Macros to produce extra running heads for stripping onto pages
  1546. %       received as camera copy.  Format must be preset to \OneCol, and
  1547. %       start on a new page.
  1548. %       Generate 5 (4 + normal running head) per page.
  1549. \def \DrawT@pLines{\vskip\topskip
  1550.         \ulap{\line{\raise 1ex\rlap{\leaders\hrule\hskip\pagewd}%
  1551.                         \leaders\hrule\hfill}}\medskip}
  1552. \def \r@nhead{\vbox to .23\vsize{\basezero \hsize=\pagewd \vfil
  1553.         \topregister \vskip\headmargin \runhead \DrawT@pLines }\medskip
  1554.         \advancepageno }
  1555. \def \nextrunner{%
  1556.         \ifnum\T@stCount>0
  1557.                 \ifnum\T@stCount>5 \TestCount=5 \else\TestCount=\T@stCount \fi
  1558.                 \advance\T@stCount by-\TestCount
  1559.                 \DrawT@pLines           % always one at top of page
  1560.                 \loop\ifnum\TestCount>1 \r@nhead \advance\TestCount by\m@ne
  1561.                         \repeat \newpage
  1562.                 \nextrunner
  1563.         \fi }
  1564. \def \ExtraRunheads #1, #2.{\T@stCount=#1
  1565.         \gdef\pageprefix{#2}%   % as in A-10 for appendices; not used just now
  1566.         \nextrunner }
  1567. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1568. %                                                                             %
  1569. %                       *****     utilities      *****                         %
  1570. %                                                                             %
  1571. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1572. \def \linebreak{\unskip\break}          % conflicts with LaTeX definition
  1573. % *********************************************************************
  1574. %  Initialization.
  1575. \def\initializearticle{%
  1576.   \let\thetitle=\relax
  1577.   \authornumber=0
  1578.   \def\@signature{\@defaultsignature}%
  1579.   \def\@authorlist{\@defaultauthorlist}%
  1580.   \@allowspanningfigstrue
  1581. \makeother\@
  1582. %               @ is prohibited in AMS-TeX, but should not be in TUGboat
  1583. \twocol
  1584. \Lasertrue
  1585. \PrelimDrafttrue
  1586. \initializearticle
  1587. \pageno=1001                    % number of title page
  1588. \StretchyTenPointSpacing
  1589. \StretchyNinePointSpacing
  1590. \StretchyEightPointSpacing
  1591. \makevertverbchar
  1592. \endinput
  1593.